package com.jhhc.StormSurgeForecast.AstronomicalTide.Dao;

import com.jhhc.StormSurgeForecast.AstronomicalTide.Pojo.bdms_forecastparameters_b;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * (bdms_forecastparameters_b)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-09 19:53:36
 */

public interface bdms_forecastparameters_bMapper {

    /**
     * 通过ID查询单条数据bdms_forecastparameters_b
     *
     * @param pid 主键
     * @return 实例对象
     */
    bdms_forecastparameters_b queryById(Integer pid);

    //根据basedata remark tag 查询一条
    bdms_forecastparameters_b queryByTag(@Param("baseData") String baseData,@Param("remark") String remark,@Param("tag") String tag);


    bdms_forecastparameters_b getBaseDats(@Param("paramId") String paramId);
    List<bdms_forecastparameters_b> getBaseDatByFschemeId(@Param("stcd") String stcd,@Param("tag") String tag);
    List<bdms_forecastparameters_b> selectByForecastSchemeId(@Param("forecastSchemeId") String forecastSchemeId);

    List<bdms_forecastparameters_b> getName(@Param("paramIds") List<String> paramIds);

    List<bdms_forecastparameters_b> queryByParamIds(@Param("paramIds") List<String> paramIds);
    List<bdms_forecastparameters_b> queryByPid(@Param("pid") Integer pid, @Param("forecastSchemeId")String  forecastSchemeId);
    /**
     * 查询指定行数据
     *
     * @param bdms_forecastparameters_b 查询条件
     * @param pageable         分页对象
     * @return 对象列表
     */
    List<bdms_forecastparameters_b> queryAllByLimit(bdms_forecastparameters_b bdms_forecastparameters_b, @Param("pageable") Pageable pageable);

    /**
     * 统计总行数
     *
     * @param bdms_forecastparameters_b 查询条件
     * @return 总行数
     */
    long count(bdms_forecastparameters_b bdms_forecastparameters_b);

    /**
     * 新增数据
     *
     * @param bdms_forecastparameters_b 实例对象
     * @return 影响行数
     */
    int insert(bdms_forecastparameters_b bdms_forecastparameters_b);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<bdms_forecastparameters_b> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<bdms_forecastparameters_b> entities);

    /**
     * 批量新增或按主键更新数据（MyBatis原生foreach方法）
     *
     * @param entities List<bdms_forecastparameters_b> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常，请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<bdms_forecastparameters_b> entities);

    /**
     * 修改数据
     *
     * @param bdms_forecastparameters_b 实例对象
     * @return 影响行数
     */
    int update(bdms_forecastparameters_b bdms_forecastparameters_b);



    int deleteById(@Param("paramIds") List<String> paramIds);
    int deleteByParamId(@Param("sybId") String sybId,@Param("paramId") String paramId,@Param("tag") String tag);
    int deleteByForecastSchemeId(@Param("forecastSchemeIds") List<String> forecastSchemeIds);
}

